<?php
class Post{
	private $id;
	private $title;
	private $picture;
	private $pdate;
	private $text;
	private $numberOfComments;
	private $comments = array();
	private $tags = array();
	
	public function postNumberOfComments($noc = null){
		if($noc == null){
			return $this->numberOfComments;
		}else{
			$this->numberOfComments = $noc;
			return true;
		}
	}
	
	public function postTitle($title = null){
		if($title == null){
			return $this->title;
		}else{
			$this->title = $title;
			return true;
		}
	}
	
	public function postPicture($picture = null){
		if($picture == null){
			return $this->picture;
		}else{
			$this->picture = $picture;
			return true;
		}
	}
	
	public function postDate($pdate = null){
		if($pdate == null){
			return $this->pdate;
		}else{
			$this->pdate = $pdate;
			return true;
		}
	}
	
	public function postId($id = null){
		if($id == null){
			return $this->id;
		}else{
			$this->id = $id;
			return true;
		}
	}
	
	public function postText($text = null){
		if($text == null){
			return $this->text;
		}else{
			$this->text = $text;
			return true;
		}
	}
	
	public function postTags($tags = null){
		if($tags == null){
			return $this->tags;
		}else{
			$this->tags = $tags;
			return true;
		}
	}
	
	public function postComments($comments = null){
		if($comments == null){
			return $this->comments;
		}else{
			$this->comments = $comments;
			return true;
		}
	}
	
	public function addTag($tag){
		array_push($this->tags, $tag);
	}
	
}
?>